﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Smartec.Accounts.Camel.AMS.WebApp.Models.RegisterModel>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Register
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="HeaderContent" runat="server">
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/MicrosoftMvcValidation.js") %>" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Create a New Account</h2>
    <p>
        Use the form below to create a new account. 
    </p>
    <p>
        Passwords are required to be a minimum of <%: ViewBag.PasswordLength %> characters in length.
    </p>

    <%Html.EnableClientValidation(true); %>

    <% using (Html.BeginForm()) { %>
        <%--<%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>--%>
        <div>
            <fieldset>
                <legend>Account Information</legend>
                
         <div class="editor-label">
            <%: Html.LabelRequiredFor(model => model.DisplayName_EN) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.DisplayName_EN)%>
            <%: Html.ValidationMessageFor(model => model.DisplayName_EN)%>
        </div>

        <div class="editor-label">
            <%: Html.LabelRequiredFor(model => model.DisplayName_AR)%>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.DisplayName_AR)%>
            <%: Html.ValidationMessageFor(model => model.DisplayName_AR)%>
        </div>

                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.UserName) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(m => m.UserName) %>
                    <%: Html.ValidationMessageFor(m => m.UserName) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.ConfirmUserName) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(m => m.ConfirmUserName)%>
                    <%: Html.ValidationMessageFor(m => m.ConfirmUserName)%>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.Password) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.Password) %>
                    <%: Html.ValidationMessageFor(m => m.Password) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.ConfirmPassword) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.ConfirmPassword) %>
                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.StartDate)%>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(m => m.StartDate)%>
                    <%: Html.ValidationMessageFor(m => m.StartDate)%>
                </div>

                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.EndDate)%>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(m => m.EndDate)%>
                    <%: Html.ValidationMessageFor(m => m.EndDate)%>
                </div>

                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.Custodian_ID)%>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(m => m.Custodian_ID)%>
                    <%: Html.ValidationMessageFor(m => m.Custodian_ID)%>
                </div>

                <div class="editor-label">
                    <%: Html.LabelRequiredFor(m => m.IsActive)%>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(m => m.IsActive)%>
                    <%: Html.ValidationMessageFor(m => m.IsActive)%>
                </div>
                <p>
                    <input type="submit" value="Register" />
                </p>
            </fieldset>
        </div>
    <% } %>
</asp:Content>
